<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script src="../js/vue.js"></script>
<div id="app">
<!--3,使用组件-->
  <my-cpn></my-cpn>
  <my-cpn></my-cpn>
  <my-cpn></my-cpn>
</div>
<script>
   //1,创建组件构造器
   const cpnC = Vue.extend({
     template:`
      <div>
        <h2>ssssss</h2>
        <p>mmmmmmm</p>
        <p>nnnnnn</p>
</div>
     `
   })
   //2，注册组件
   Vue.component("my-cpn",cpnC)
   const app = new Vue({
     el:'#app',
     data:{
       message:'hello vue',
     }

   })

</script>
const cpnC2 = Vue.extend({
template:`
<div>
  <h2>我是标题2</h2>
  <p>我是内容，呵呵呵</p>
</div>
`,
components:{
cpnC1:cpnC1
}
})
</body>
</html>